package org.seedframework.sharding.strategy;

/**
 * Data distributed by key, and the way to location is A Strategy
 *
 * <p>calculate the DatabaseName and TableName</p>
 */
public interface ScatterStrategy {

    /**
     * @return returns Database Name
     */
    String dataSource(String key);

    /**
     * @return returns Table Name
     */
    String tableSuffix(String key);

    /**
     * @return current strategy name
     */
    default String getStrategyName() {
        return null;
    };

}
